<?php 
include "includes/session.php";
include "includes/comunes.php";
require_once("includes/paginator.class.php");

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>Sistema de Registro de Atencion</title>

<link href="estilos.css" rel="stylesheet" type="text/css" />

<!--libreria jquery central-->

<script src="jquery-ui/js/jquery-1.9.1.js"></script>
<!--fin libreria central-->

<!--Librerias para el combo-->
<script language="JavaScript" type="text/javascript" src="combos/jquery.chainedSelects.js"></script>
<!--fin libreria-->

<!--librerias ui-->
<link href="jquery-ui/css/ui-lightness/jquery-ui-1.10.2.custom.css" rel="stylesheet"/>
<script src="jquery-ui/js/jquery-ui-1.10.2.custom.js"></script>
<!--fin libreria-->
<!--libreria flexigrid-->
<link rel="stylesheet" type="text/css" href="jquery-ui/css/ui-flexigrid/flexigrid.css">
    <script type="text/javascript" src="jquery-ui/js/flexigrid.js"></script>
<!--fin libreria-->
<!--VENTANA MODAL -->
<link href="modal/styles/modal-window.css" type="text/css" rel="stylesheet" /> 
 
		<script type="text/javascript" language="javascript" src="modal/scripts/modal-window.min.js"></script>  


<script language="JavaScript" type="text/javascript">
$(function()
{

<?php  for ($a=1;$a<=5;$a++):?>
		
		$( "#codigo<?php echo $a?>" ).autocomplete({
			source: "autoArticulos.php",
			minLength: 2,
                select: function(event, ui) {
					$("#codigo<?php echo $a?>").val(ui.item.value);
					$("#prove<?php echo $a?>").val(ui.item.prove);
		
                }
		});
		
		
       $( "#fecha<?php echo $a?>" ).datepicker({
         dateFormat: "dd/mm/yy"

      });
              
<?php endfor?>

	  $( "#menu" ).menu({position: {at: "left bottom"}});

});
</script>



</head>

<body>

<div class="container">
<?php include "includes/head.php"?>
   <div class="content">
       <div class="tituloprincipal"><img src="img/etiquetasEnvios.jpg" width="25" height="25" border="0"/> Impresion de Etiquetas de Envios
           <?php include 'includes/submenu.php';?>  
           </div>
       
       <div class="contenedorpedido">
       <form id="altapedido" name="altapedido" method="POST" action="imprimirA4envios.php">
        
      
           <fieldset>
             <legend><b>Cargar Bultos/Pallets</b></legend>
             
             </br>

             <table >
			 <tr>
			 <td class="textotablamenuform" >Origen</td>
			 <td class="textotablamenuform">Deposito Intermedio</td>
			 <td class="textotablamenuform">Destino Final</td>
			  <td class="textotablamenuform">Fecha</td>
			   <td class="textotablamenuform">N° Trans.</td>
			 <td class="textotablamenuform">Bultos</td>
             <td class="textotablamenuform">Pallets</td>
			 </tr>
  
               <tbody>

                <?php
                
                for($i=1;$i<=5;$i++):?>
                  <tr id="fila<?php echo $i?>">
                     
                     <td >
					 <select name="origen<?php echo $i?>" id="origen<?php echo $i?>" class="campo_form">
                             <option selected value="0">Todos...</option>
                             <?php
                             $ped=obtener_sucursales();
							 while($regPed=mysql_fetch_array($ped)){
                                 echo "<option value='".utf8_encode($regPed['sucursalId'])."'>".utf8_encode($regPed['sucursalNombre'])." (".utf8_encode($regPed['sucursalCodigo']).")</option>";
							} ?>
							</select>
					 
					
					 </td>
					   <td >
					 <select name="inter<?php echo $i?>" id="inter<?php echo $i?>" class="campo_form">
                             <option selected value="0">Todos...</option>
                             <?php
                             $ped=obtener_sucursales();
							 while($regPed=mysql_fetch_array($ped)){
                                 echo "<option value='".utf8_encode($regPed['sucursalId'])."'>".utf8_encode($regPed['sucursalNombre'])." (".utf8_encode($regPed['sucursalCodigo']).")</option>";
							} ?>
							</select>
					 
					
					 </td>
					   <td >
					 <select name="final<?php echo $i?>" id="final<?php echo $i?>" class="campo_form">
                             <option selected value="0">Todos...</option>
                             <?php
                             $ped=obtener_sucursales();
							 while($regPed=mysql_fetch_array($ped)){
                                 echo "<option value='".utf8_encode($regPed['sucursalId'])."'>".utf8_encode($regPed['sucursalNombre'])." (".utf8_encode($regPed['sucursalCodigo']).")</option>";
							} ?>
							</select>
					 
					
					 </td>
					<td ><input  type="text" name="fecha<?php echo $i?>" id="fecha<?php echo $i?>"  style="width:90%;"value="" class="campo_form"/></td>
					<td ><input  type="number" name="pto<?php echo $i?>" id="pto<?php echo $i?>"  style="width:20%;"value="" class="campo_form"/>
					<input  type="number" name="nro<?php echo $i?>" id="nro<?php echo $i?>"  style="width:70%;"value="" class="campo_form"/>
					</td>					
					<td ><input  type="number" name="bultos<?php echo $i?>" id="bultos<?php echo $i?>"  style="width:90%;"value="" class="campo_form"/></td>
						<td ><input  type="number" name="pallet<?php echo $i?>" id="pallet<?php echo $i?>"  style="width:90%;"value="" class="campo_form"/></td>
                     
                  </tr>
                 <?php
                 endfor
                
                 ?>

                  
                </tbody>

             </table>
             

        </fieldset>
           <fieldset>
             <legend><b>Seleccionar Formato de Impresion</b></legend>
             <table>
              
                   <tr>
                  
                         <td class="textotablamenuform" style="text-align: right;" > <input type="submit" name="A4" value="Etiquetas A4(Hoja Completa)"  class="boton_form"/> </td>
                      		</tr>
						
						<!--<tr>
						 <td class="textotablamenuform" style="text-align: right;" > </td>
					
						 <td class="textotablamenuform" style="text-align: right;" > <input name="10x5" id="submit" type="submit" value="Etiquetas 10x5" class="boton_form"/> </td>
						<td class="textotablamenuform" style="text-align: right;" >  <input name="10x8" id="submit" type="submit" value="Etiquetas 10x8" class="boton_form"/> </td>
                    
                 </tr>-->
             </table>
        </fieldset>
		 </form>
       </div>
 
       <div class="clear"></div>
   <br>
   </div>
  <?php include "includes/pie.php"?>
  
</div>


</body>
</html>
